// 在这里面定义所有接口，一个文件管理所有接口，易于维护
import {
  http
} from './http'; // 引入刚刚封装好的http模块，import属于ES6的语法，微信开发者工具必须打开ES6转ES5选项

// 论坛新增
function forumSave(postData, doSuccess, doFail, doComplete) {
  http('/forum/save', 'post', postData, doSuccess, doFail, doComplete)
}

// 论坛查询
function forumPageList(postData, doSuccess, doFail, doComplete) {
  http('/forum/forumPageList', 'post', postData, doSuccess, doFail, doComplete)
}

// 论坛删除
function forumDel(postData, doSuccess, doFail, doComplete) {
  http('/forum/del', 'post', postData, doSuccess, doFail, doComplete)
}

// 点赞
function tagsSave(postData, doSuccess, doFail, doComplete) {
  http('/tags/save', 'post', postData, doSuccess, doFail, doComplete)
}

export default { // 暴露接口
  forumSave,
  forumPageList,
  forumDel,
  tagsSave
}